<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<jsp:include page="./common-header.jsp"/>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<jsp:include page="./import-resource.jsp"/>

<!--[if lt IE 9]>
<script type="text/javascript" src="${pageContext.request.contextPath}/plugins/bootstrap/js/respond.min.js"></script>
<![endif]-->

<!--[if (gte IE 8)&(lt IE 10)]>
<script type="text/javascript" src="${pageContext.request.contextPath}/plugins/jqueryFileUpload/js/cors/jquery.xdr-transport.js"></script>
<![endif]-->

<!--[if IE 7]>
<![endif]-->

<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/plugins/bootstrap/css/ie.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrap-ie.js"></script>
<![endif]-->
</head>
<body>
<div class="header">
    <div class="navbar-brand p-l-10">
        <div class="p-t-2"><a href="showPage/front_index"><img class="logo-img" height="40" width="40" alt="logo"
                                                               src="${pageContext.request.contextPath}/images/logo.png"/> ${project.name }
        </a>
            <span class="header-version version">
          <a class="cnoj-open-popup" data-title="${version.version}更新信息" data-uri="version/view?id=${version.id}"
             data-width="600" href="javascript:void(0)">${version.version }</a>
          </span>
        </div>
    </div>
    <div class="navbar-left">
        <div class="header-info-row line-ell text-center">
            <div class="row">
                <div class="col-sm-5">
                    <div class="user-info">
                        <i class="fa fa-user fa-lg"></i> &nbsp;<strong>${userInfo.fullName}</strong> &nbsp;
                        <c:if test="${userInfo.seqDeptNames != null && userInfo.seqDeptNames != ''}"><span
                                title="${userInfo.seqDeptNames }">【${userInfo.seqDeptNames }】</span></c:if>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-5 center-text show-calendar">
                    <div class="text-bold"><i class="fa fa-calendar fa-lg"></i> &nbsp;<span id="show-date"></span></div>
                </div>
            </div>
        </div>
    </div>
    <div class="navbar-nar-right p-t-5">
        <ul class="navbar-menu">
            <li>
                <a href="showPage/front_index"><span class="glyphicon glyphicon-home"></span> 首页</a>
            </li>
            <li>
                <a href="#" class="cnoj-open-blank" data-uri="showPage/front_user_changePwd" data-title="修改密码"
                   data-width="520"><i class="fa fa-pencil-square-o fa-lg"></i>&nbsp;修改密码</a>
            </li>

            <c:choose>
                <c:when test="${userInfo.stuId !=null }">
                    <li>
                        <a href="#" class="cnoj-open-blank"
                           data-uri="showPage/front_stu_edit?op=edit&busiName=stu&id=${userInfo.stuId }"
                           data-title="修改信息"
                           data-width="520"><i class="fa fa-pencil-square-o fa-lg"></i>&nbsp;修改就业信息</a>
                    </li>
                </c:when>
            </c:choose>
            <li>
                <a href="user/logout"><i class="icon icon-logout"></i>安全退出</a>
            </li>
        </ul>
    </div>
</div><!-- header -->
<div class="wrap-main p-t-3">
    <script type="text/javascript">
        //设置ueditor所在路径
        <%--window.UEDITOR_HOME_URL = '${pageContext.request.contextPath}/plugins/ueditor/';--%>

        $(document).ready(function () {
            setTimeout('initEvent()', 300);
            autoHeaderWidth();
            $(window).resize(function () {
                autoHeaderWidth();
            });
            $("#show-date").cnojCalendar({
                isShowHMS: false
                /*showHTag:"#show-hours",
                showMTag:"#show-minute",
                showSTag:"#show-seconds-twinkle"*/
            });

            var screenW = window.screen.width;
            var screenH = window.screen.height;
            var param = "resolution=" + screenW + "x" + screenH + "&screenWidth=" + screenW + "&screenHeight=" + screenH;
        });

        function autoHeaderWidth() {
            var w = $(window).width();
            var infoW = $(window).width() - $(".navbar-nar-right").outerWidth(true) - $(".navbar-brand").outerWidth(true) - 50;
            $(".header-info-row").width(infoW);
            if (infoW < 500) {
                $(".show-calendar").hide();
            }
            if (w < 820) {
                $(".header-info-row").hide();
            }
        }
    </script>
</div>

<style>
    .header {
        background-color: #e75858;
        background-image: none;
        height: 70px;
    }
</style>
